package com.yanxml.springboot.core.listener.custom.business_event.event;

import lombok.Getter;
import lombok.Setter;
import org.springframework.context.ApplicationEvent;

/**
 * 自定义事件 . ---> 可以包括复杂事件, 包括事件时间, 处理方式等.
 */
@Getter
@Setter
public class MyCustomApplicationEvent extends ApplicationEvent {

    private String name;

    /**
     * Create a new {@code ApplicationEvent}.
     *
     * @param source the object on which the event initially occurred or with
     *               which the event is associated (never {@code null})
     */
    public MyCustomApplicationEvent(Object source) {
        super(source);
    }

    public MyCustomApplicationEvent(Object source, String name) {
        super(source);
        this.name = name;
    }

}
